<script language="javascript">

$(function(){
		   
	$('#formLogin').ajaxForm({
		dataType: 'json',
		beforeSubmit: function() {
			if( $("#txtUser").val() == "" || $("#txtPass").val() == "" ){
				alert("Preencha os dados corretamente!!")
				return false;
			}
		},
		success: function(responseText, statusText) {
			if(responseText.sucesso){
				window.location = "/?pg=home_escola";
			}else{
				$.jAlert(responseText.mensagem, '', function(result) {});
			}
		}

	})
})	

function cancelar(){window.location = "/";	}

</script>

<div id="dlogin">
<form action="actions/loginEscolaAction.php" method="post" style="background:url(../images/PanelBasBag.png) no-repeat; width:614px; height:363px;" id="formLogin" name="formLogin">
	    
        <div style="position:relative;top:80px;left:240px;">    
        <table width="301" border="0" cellspacing="0">
          <tr>
            <td height="45" colspan="2" align="center"><strong>Login Master da Escola</strong></td>
          </tr>
          <tr>
            <td width="90" height="45"><label for="login">Usu&aacute;rio:</label></td>
            <td width="195"><input type="text" id="txtUser" name="txtUser"/></td>
          </tr>
          <tr>
            <td height="45"><label for="senha">Senha:</label></td>
            <td><input type="password" id="txtPass" name="txtPass"/></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><a href="#" style="text-decoration:none;color:#3E66D9;font-size:10px;"> Esqueci a minha senha </a></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td colspan="2" align="center">
                <input type="submit" id="btnEntrar" value="Entrar" />
                &nbsp; 
                <input type="button" onClick="cancelar()" value="Cancelar" />
            </td>
          </tr>
    </table>
     </div>
        				
  </form>
</div>